package com.atgugui.vod.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 阿里云视频上传需要的静态参数的工具类
 */
@Component
public class VodConstantPropertiesUtils implements InitializingBean {
    @Value("${aliyun.oss.file.keyid}")
    private String keyId;

    @Value("${aliyun.oss.file.keysecret}")
    private String keysecret;

    public static String KEY_ID;

    public static String KEY_SECRET;

    /**
     * 在上述的value值初始化之后执行的
     * @throws Exception
     */
    @Override
    public void afterPropertiesSet() throws Exception {
        KEY_ID = keyId;
        KEY_SECRET = keysecret;
    }
}
